﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SnmpForm.ApBatchConfig
{
    class BatchWlanSecureTask:BatchTask
    {
        string m_strRequest = "";
        public BatchWlanSecureTask(FrmApBatchConfig objForm,
            List<BusinessWrapper.Ap> aps, 
            string strRequest)
            : base(objForm, aps)
        {
            m_strRequest = strRequest;
        }

        public override void ApRequestAction(BusinessWrapper.Ap ap)
        {
            if (m_strRequest.Length>3)
            {
                string strType = m_strRequest.Split('#')[0];
                switch (strType)
                {
                    case "None":
                        ap.SetWirelessNoneSecure(m_strRequest);
                        break;
                    case "WPA":
                        ap.SetWirelessWPASecure(m_strRequest);
                        break;
                    case "WEP":
                        ap.SetWirelessWEPSecure(m_strRequest);
                        break;
                    default:
                        break;
                }
            }
            else
            {
            }
        }
    }
}
